package de.kardass.jannobatch.skiprepeatabort;

import static org.junit.Assert.*;

import de.kardass.jannobatch.ItemProcessorAdapter;

public class StepTwo extends ItemProcessorAdapter<WorkflowItem, WorkflowItem> {

    @Override
    public WorkflowItem process(WorkflowItem item) {
        assertTrue("Should not reach step 2 - item: " + item, isValidItem(item));
        return item;
    }

    private boolean isValidItem(WorkflowItem item) {
        return item.getId() == 0 || item.getId() == 1 || item.getId() == 2;
    }

}
